package com.example.seckillweb.bean;

import java.sql.Timestamp;
import java.util.Objects;

/**
 * @description: TODO
 * @author: uu
 * @date: 2023/12/18 20:05
 * @version: 1.0
 */
public class Goods {
    private int id;
    private int goodsId;
    private String goodsName;
    private Double price;
    private String content;
    private Integer status;
    private Integer totalStocks;
    private Timestamp createTime;
    private Timestamp updateTime;
    private Integer spike;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getTotalStocks() {
        return totalStocks;
    }

    public void setTotalStocks(Integer totalStocks) {
        this.totalStocks = totalStocks;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getSpike() {
        return spike;
    }

    public void setSpike(Integer spike) {
        this.spike = spike;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Goods goods = (Goods) o;
        return id == goods.id && goodsId == goods.goodsId && Objects.equals(goodsName, goods.goodsName) && Objects.equals(price, goods.price) && Objects.equals(content, goods.content) && Objects.equals(status, goods.status) && Objects.equals(totalStocks, goods.totalStocks) && Objects.equals(createTime, goods.createTime) && Objects.equals(updateTime, goods.updateTime) && Objects.equals(spike, goods.spike);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, goodsId, goodsName, price, content, status, totalStocks, createTime, updateTime, spike);
    }
}
